<?php
	$to = "read@kindlence.com"; 
	$subject = "Kindlence User";
	$email = $_POST['kindleuser'] . $_POST['freeorpremium'];
	$categories = "";
	if(!empty($_POST['categories'])) {
		$categories = "Categories: " . implode(", ", $_POST['categories']);
	}
	$header = "From: ".$email." <".$email.">";

$body = "
Email: $email.
$categories";

	if(mail($to, $subject, $body, $header)) {
		header("Location: ./done.html");
	} else {
		header("Location: ./error.html");
	}
?>